import request from '@/service'
import type { IOResponse } from '@/service/types'

// 疾控党建_组织队伍
export const orgTeam = (): Promise<IOResponse> => {
  return request.post('/v2/large/screen/stat', {
    statCode: 'ZJCDC_ZZDW_001',
  })
}

// 疾控党建_概况
export const overview = (): Promise<IOResponse> => {
  return request.post('/v2/large/screen/stat', { statCode: 'ZJCDC_GK_002' })
}

// 疾控党建_党员队伍
export const partyTeam = (): Promise<IOResponse> => {
  return request.post('/v2/large/screen/stat', { statCode: 'ZJCDC_DYDW_003' })
}
// 疾控党建_党员队伍-性别
export const partyTeamSex = (data): Promise<IOResponse> => {
  return request.post(
    '/v2/large/screen/stat',
    Object.assign({ statCode: 'ZJCDC_DYDW_SEX001' }, data),
  )
}
// 疾控党建_党员队伍-学历
export const partyTeamXl = (data): Promise<IOResponse> => {
  return request.post(
    '/v2/large/screen/stat',
    Object.assign({ statCode: 'ZJCDC_DYDW_XL002' }, data),
  )
}
// 疾控党建_党员队伍-年龄
export const partyTeamNl = (data): Promise<IOResponse> => {
  return request.post(
    '/v2/large/screen/stat',
    Object.assign({ statCode: 'ZJCDC_DYDW_NL003' }, data),
  )
}
// 疾控党建_党员队伍-性别
export const partyTeamDl = (data): Promise<IOResponse> => {
  return request.post(
    '/v2/large/screen/stat',
    Object.assign({ statCode: 'ZJCDC_DYDW_DL004' }, data),
  )
}

// 疾控党建_组织生活
export const orgLive = (): Promise<IOResponse> => {
  return request.post('/v2/large/screen/stat', { statCode: 'ZJCDC_ZZSH_004' })
}
// 疾控党建_组织生活-列表
export const orgLiveList = (data): Promise<IOResponse> => {
  return request.post('/v2/large/screen/list', data)
}

// 疾控党建_学习任务
export const studyTask = (): Promise<IOResponse> => {
  return request.post('/v2/large/screen/list', { statCode: 'ZJCDC_XXRW_005' })
}

// 疾控党建_堡垒指数-列表
export const blzsList = (): Promise<IOResponse> => {
  return request.post('/v2/large/screen/list', { statCode: 'ZJCDC_BLZS_006' })
}
// 疾控党建_堡垒指数-详情
export const blzsInfo = (data): Promise<IOResponse> => {
  return request.post('/v2/large/screen/stat', data)
}
// 疾控党建_堡垒指数-详情-list
export const blzsListInfo = (data): Promise<IOResponse> => {
  return request.post('/v2/large/screen/list', data)
}

// 疾控党建_先锋指数-列表
export const xfzsList = (): Promise<IOResponse> => {
  return request.post('/v2/large/screen/list', { statCode: 'ZJCDC_XFZS_007' })
}

// 疾控党建_先锋指数-列表
export const xfzsList2 = (data): Promise<IOResponse> => {
  return request.post('/v2/large/screen/list', data)
}

// 登录
export const login = (data = {}): Promise<IOResponse> => {
  return request.post('/v2/sso/login', data, {
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  })
}

// 组织
export const departmentalTree = (data = {}): Promise<IOResponse> => {
  return request.post('/v2/large/screen/tree', data)
}
// 组织-children
export const childrenTree = (data = {}): Promise<IOResponse> => {
  return request.post('/v2/large/screen/childrenTree', data)
}
